package com.guoqi.controller;

import com.guoqi.service.IUserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("users")
public class UserInfoController {

    @Autowired
    private IUserInfoService userInfoService;

    @GetMapping("get")
    @ResponseBody
    public Object findByName(){
        return userInfoService.findByName("dafei");
    }

    @GetMapping("passwd")
    @ResponseBody
    public Object findByPasswd(){
        return userInfoService.findByPasswd("1111");
    }

}
